package com.hckjsec.cloud.service.impl;

import java.util.List;
import java.util.Map;

import com.hckjsec.cloud.domain.AppletsConfigMatter;
import com.hckjsec.cloud.mapper.AppletsConfigMatterMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.hckjsec.cloud.service.IAppletsConfigMatterService;

/**
 * 配置事项Service业务层处理
 * 
 * @author cyt
 * @date 2021-08-03
 */
@Service
public class AppletsConfigMatterServiceImpl implements IAppletsConfigMatterService 
{
    @Autowired
    private AppletsConfigMatterMapper appletsConfigMatterMapper;

    /**
     * 查询配置事项
     * 
     * @param id 配置事项ID
     * @return 配置事项
     */
    @Override
    public AppletsConfigMatter selectAppletsConfigMatterById(Long id)
    {
        return appletsConfigMatterMapper.selectAppletsConfigMatterById(id);
    }

    /**
     * 查询配置事项列表
     * 
     * @param appletsConfigMatter 配置事项
     * @return 配置事项
     */
    @Override
    public List<AppletsConfigMatter> selectAppletsConfigMatterList(AppletsConfigMatter appletsConfigMatter)
    {
        return appletsConfigMatterMapper.selectAppletsConfigMatterList(appletsConfigMatter);
    }

    /**
     * 新增配置事项
     * 
     * @param appletsConfigMatter 配置事项
     * @return 结果
     */
    @Override
    public int insertAppletsConfigMatter(AppletsConfigMatter appletsConfigMatter)
    {
        return appletsConfigMatterMapper.insertAppletsConfigMatter(appletsConfigMatter);
    }

    /**
     * 修改配置事项
     * 
     * @param appletsConfigMatter 配置事项
     * @return 结果
     */
    @Override
    public int updateAppletsConfigMatter(AppletsConfigMatter appletsConfigMatter)
    {
        return appletsConfigMatterMapper.updateAppletsConfigMatter(appletsConfigMatter);
    }

    /**
     * 批量删除配置事项
     * 
     * @param ids 需要删除的配置事项ID
     * @return 结果
     */
    @Override
    public int deleteAppletsConfigMatterByIds(Long[] ids)
    {
        return appletsConfigMatterMapper.deleteAppletsConfigMatterByIds(ids);
    }

    /**
     * 删除配置事项信息
     * 
     * @param id 配置事项ID
     * @return 结果
     */
    @Override
    public int deleteAppletsConfigMatterById(Long id)
    {
        return appletsConfigMatterMapper.deleteAppletsConfigMatterById(id);
    }

    @Override
    public List<Map<String, String>> findMap(Long configId) {
        return appletsConfigMatterMapper.findMap(configId);
    }

    @Override
    public int updateAppletsConfigByConfigId(AppletsConfigMatter appletsConfigMatter) {
        return appletsConfigMatterMapper.updateAppletsConfigByConfigId(appletsConfigMatter);
    }

    /**
     * 删除配置事项
     *
     * @param configId 配置事项ID
     * @return 结果
     */
    @Override
    public int deleteAppletsConfigMatterByConfigId(Long configId) {
        return appletsConfigMatterMapper.deleteAppletsConfigMatterByConfigId(configId);
    }
}
